#
# @lc app=leetcode.cn id=1018 lang=python
#
# [1018] 可被 5 整除的二进制前缀
#

# @lc code=start
class Solution(object):
    def prefixesDivBy5(self, nums):
        """
        :type nums: List[int]
        :rtype: List[bool]
        """
        total=0
        result=[]
        for num in nums:
            total=total*2+num
            if total%5==0:
                result.append(True)
            else:
                result.append(False)
        return result
# @lc code=end

